package com.gupao.demo.annotation.componentScan;import org.junit.Test;import org.springframework.context.ApplicationContext;import org.springframework.context.annotation.AnnotationConfigApplicationContext;import java.util.Arrays;public class MyTest {    @Test    public void test(){        ApplicationContext app = new AnnotationConfigApplicationContext(MyConfig.class);        String[] beanDefinitionNames = app.getBeanDefinitionNames();        System.out.println(Arrays.toString(beanDefinitionNames).                replaceAll("\\[|\\]","")                .replaceAll(",","\n"));    }}